import request from '@/utils/request'


const api_name='/admin/product/categoryBrand'



// 根据分类的id获取品牌数据
export const FindBrandByCategoryId = categoryId => {
    return request({
      url: `${api_name}/findBrandByCategoryId/${categoryId}`,
      method: 'get',
    })
}
/**
 * 删除分类品牌
 * @param {*} id 
 * @returns 
 */
export const DeleteCategoryBrandById=id=>{

    return request({
        url:`${api_name}/deleteById/${id}`,
        method:'delete',

    })
}

/**
 * 修改分类品牌
 * @param {*} data 
 * @returns 
 */
export const UpdateCategoryBrandById=data=>{

    return request({
        url:`${api_name}/updateById`,
        method:'put',
        data


    })
}

/**
 * 新增分类品牌
 * @param {} data 
 * @returns 
 */
export const SaveCategoryBrand=data=>{

    return request({
        url:`${api_name}/save`,
        method:'post',
        data


    })
}
/**
 * 分页条件查询分类品牌
 * @param {*} queryData 
 * @returns 
 */
export const GetCategoryBrandPageList=(page,limit,queryData)=>{

    return request({
        url:`${api_name}/${page}/${limit}`,
        method:'get',
        params:queryData


    })
}